﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SGRapidForm.Permission.Service.Interface;
using SGRapidForm.Permission.Entity;
using SGRapidForm.Permission.Component;
using Microsoft.Practices.Unity;

namespace SGRapidForm.Permission.Service
{
    public partial class PermissionService : IPermissionService
    {
        [Dependency]
        public RoleModuleComponent RoleModuleComponent
        { get; set; }

        public bool RoleModule_Add(string roleKeyid, string moduleKeyid)
        {
            return this.RoleModuleComponent.RoleModule_Add(roleKeyid, moduleKeyid);
        }

        public bool RoleModule_Delete(string roleKeyid, string moduleKeyid)
        {
            return this.RoleModuleComponent.RoleModule_Delete(roleKeyid, moduleKeyid);
        }

        public bool RoleModule_DeleteByRoleKeyid(string roleKeyid)
        {
            return this.RoleModuleComponent.RoleModule_DeleteByRoleKeyid(roleKeyid);
        }

        public List<PermissionDetails> RoleModule_GetDetailsByRoleKeyid(string roleKeyid)
        {
            return this.RoleModuleComponent.RoleModule_GetDetailsByRoleKeyid(roleKeyid);
        }

        public bool RoleModule_BulkAdd(string roleKeyid, string[] moduleKeyids)
        {
            return this.RoleModuleComponent.RoleModule_BulkAdd(roleKeyid, moduleKeyids);
        }
    }
}
